Unattended updates

In this section, you will learn how to run unattended updates of your working environments using the same script discussed under Updating outside of SNiFF+.

- On Unix, unattended updates are run using

cron .
- On Windows NT, unattended updates are performed using
at . On Windows 95, you will need a utility for delayed command execution.
Unattended updates should be performed in the same order as regular updates:

- first your SSWEs
- than your SOWEs
- and finally your PWEs

Your Working Environment Administrator should be responsible for unattended updates.
How SNiFF+ handles project structure changes during an unattended update
Your team members can modify the structure of a project in a PWE by checking out and modifying the project's project description file (PDF). When the modified PDF is checked in again, the project in the other working environments used by your team are structurally out of date. Its structure must be updated during an update of the working environments. The following is an overview of the possible changes and how SNiFF+ in batch-mode reacts to these structural project changes while updating a working environment:

- A PDF has been modified -- Any structural change to a project requires a modification to its PDF. When you open a project, SNiFF+ checks whether its PDF is up to date, checks out the latest version if necessary, and then opens it.
- Files have been removed from a project -- If files have been removed from a project, SNiFF+ does not delete them. It is the responsibility of the owner of the working environment to remove obsolete files. For a listing of potentially obsolete files in a working environment, you can use the Check Obsolete Files command in the Project Editor or the sniffaccess command.
- Files have been added to a project -- If files have been added to a project, these files need to be checked out in your team's SSWE. When SNiFF+ opens a project, it checks out those files specified in the project's PDF that aren't present in the working environment.
- New subprojects have been added to a project -- If a new subproject has been added to a project, the directory for this subproject needs to be created, and its PDF and the other files in the project need to be checked out. When SNiFF+ opens a project and it cannot find the PDF of a subproject, it creates the project directory and tries to check out the PDF and then to open it. Then the files of the new subproject are checked out if necessary.
- Subprojects have been removed from a project -- If a subproject has been removed from a project, SNiFF+ does not delete it. It is the responsibility of the owner of the working environment to remove obsolete files. For a listing of potentially obsolete files in a working environment, you can use the Check Obsolete Files command in the Project Editor or the sniffaccess command.

Examples of executing the update script on Unix
Here are some examples of how you would execute the update script:

- Shared Source Working Environment

00 02 * * * cd /shared_src; $SNIFF_DIR/ws_support/ updateWS.sh <WorkingEnvironmentName> <project> SSWE
- Shared Object Working Environment
00 03 * * * cd /shared_obj; $SNIFF_DIR/ws_support/ updateWS.sh <WorkingEnvironmentName> <project> SOWE
- Private Working Environment
00 04 * * * cd /private; $SNIFF_DIR/ws_support/updateWS.sh
<WorkingEnvironmentName> <project> PWE
In the examples above, the commands are executed at 2, 3 and 4 o'clock in the morning, respectively.

| Note
| For a description of the parameters, refer to Parameters used with the update script.

Parameters used with the update script

Parameter | Description
<WorkingEnvironmentName> | Refers to the working environment whose projects are to be updated. Enter the full name of the working environment, (including the PWE owner's username if there is one), as it appears in the Working Environments Tree. Examples: "SSWE:GA_teamSSWE" "SOWE:GA_teamSOWE" "Bob PWE:BobPWE" ( username included) "PWE:BobPWE" ( username not included)
<project> | Refers to the specific project that is to be updated. A project is specified by the project directory (as it appears in the Project Directory field in the Project Attributes dialog), followed by the project's PDF, e.g., COMPLEX/complex/complex.shared
[SSWE|SOWE|PWE] | Enter one of the three options to specify the type of working environment to be updated. SSWE -- Shared Source Working Environment SOWE -- Shared Object Working Environment PWE -- Private Working Environment

Running SNiFF+ without display (batch mode)
You can start a SNiFF+ session without a display.
SNiFF+ runs without a display when the SNIFF_BATCH environment variable is set to 1 . In the SNiFF+ update script, this is set by default. To manually set the variable:
On Unix:

Open a shell.
In a shell, set the

SNIFF_BATCH environment variable to 1 :
setenv SNIFF_BATCH 1

On Windows:

Open a Command Prompt.
In the Command Prompt, set the

SNIFF_BATCH environment variable to 1 :
set SNIFF_BATCH=1